<template>
<!--  组建的结构-->
  <div>
    <h2 class="demo">my school : {{msg}}</h2>
    <h2 class="demo">当前n：{{n}}</h2>
    <button @click="add">add</button>
  </div>

</template>

<script >
//交互的代码
export default{
  name:'SchoolInfo',
  data(){
    return{msg:'翰林', n:0}
  },
  methods:{
    add(){
      this.n++
    }
  }
}


</script>

<style>
/*组件的样式*/
.demo{
  background-color: #95be28;
}
</style>
